<template>
	<view>
		
		<view class="center-second mtlr30">
			<view class="mtlr30">
				<view class="pt30" style="display: flex;justify-content: space-between;">
					<view style="color:#3ACD90;font-size: 30rpx;">当前业绩总和</view>
				</view>
				<view class="flex-center" style="display: flex;padding-bottom: 24rpx;">
					<view class="mt30 fbold" style="font-size: 50rpx;">{{ totalMoney }}</view>
				</view>
		
		
			</view>
		</view>
		
		<view style="display: flex;">
			<view class="center-second mtlr30" style="width: 50%">
				<view class="mtlr30" >
					<view class="pt30">
						<view>加盟店业绩</view>
					</view>
					<view class="flex-center" style="display: flex;padding-bottom: 24rpx;">
						<view class="mt30" style="font-size: 50rpx;">{{ jiamengdianyeji }}</view>
					</view>
				</view>
				
			</view>
		
			<view class="center-second" style="width: 50%;margin-right: 30rpx;">
				<view class="mtlr30" >
					<view class="pt30">
						<view>代理业绩</view>
					</view>
					<view class="flex-center" style="display: flex;padding-bottom: 24rpx;">
						<view class="mt30" style="font-size: 50rpx;">{{ dailiyeji }}</view>
					</view>
				</view>
				
			</view>
		</view>
		
		
		<view style="display: flex;">
			<view class="center-second mtlr30" style="width: 50%">
				<view class="mtlr30" >
					<view class="pt30">
						<view>城市合伙人业绩</view>
					</view>
					<view class="flex-center" style="display: flex;padding-bottom: 24rpx;">
						<view class="mt30" style="font-size: 50rpx;">{{ chensghiyeji }}</view>
					</view>
				</view>
				
			</view>
		
			<view class="center-second" style="width: 50%;margin-right: 30rpx;">
				<view class="mtlr30" >
					<view class="pt30">
						<view>社区业绩</view>
					</view>
					<view class="flex-center" style="display: flex;padding-bottom: 24rpx;">
						<view class="mt30" style="font-size: 50rpx;">{{ shequyeji }}</view>
					</view>
				</view>
				
			</view>
		</view>
		
		<view style="display: flex;">
			<view class="center-second mtlr30" style="width: 50%">
				<view class="mtlr30" >
					<view class="pt30">
						<view>品牌使用费业绩</view>
					</view>
					<view class="flex-center" style="display: flex;padding-bottom: 24rpx;">
						<view class="mt30" style="font-size: 50rpx;">{{ pinpaiyeji }}</view>
					</view>
				</view>
				
			</view>
		
			<view class="center-second" style="width: 50%;margin-right: 30rpx;">
				<view class="mtlr30" >
					<view class="pt30">
						<view>我店生活业绩</view>
					</view>
					<view class="flex-center" style="display: flex;padding-bottom: 24rpx;">
						<view class="mt30" style="font-size: 50rpx;">{{ wodianyeji }}</view>
					</view>
				</view>
				
			</view>
		</view>
		
		<view style="display: flex;">
			<view class="center-second mtlr30" style="width: 50%">
				<view class="mtlr30" >
					<view class="pt30">
						<view>其他业绩</view>
					</view>
					<view class="flex-center" style="display: flex;padding-bottom: 24rpx;">
						<view class="mt30" style="font-size: 50rpx;">{{ otheryeji }}</view>
					</view>
				</view>
				
			</view>
		
			<view class="center-second" style="width: 50%;margin-right: 30rpx;">
				<view class="mtlr30" >
					<view class="pt30">
						<view>选品官业绩</view>
					</view>
					<view class="flex-center" style="display: flex;padding-bottom: 24rpx;">
						<view class="mt30" style="font-size: 50rpx;">{{ xuanpinguanyeji }}</view>
					</view>
				</view>
				
			</view>
		</view>
		
		
	</view>
</template>

<script>
	import {
		dataDetail
	} from "@/common/apis/other.js"
	
	export default {
		name:"yeji",
		props:{
			selected: {
				default: 'person',
				type: String
			},
			starttime: {
				default: '',
				type: String
			},
			endtime: {
				default: '',
				type: String
			},
		},
		data() {
			return {
				totalMoney:0.0,
				jiamengdianyeji:'暂无信息',
				dailiyeji:"暂无信息",
				chensghiyeji:"暂无信息",
				shequyeji:"暂无信息",
				pinpaiyeji:"暂无信息",
				wodianyeji:"暂无信息",
				otheryeji:"暂无信息",
				xuanpinguanyeji:"暂无信息",

				
			};
		},
		
		created(){
			console.log(this.starttime)
			console.log(this.endtime)
			this.getDataDetail()
		},
		methods:{
			getDataDetail(){
				var that = this
				let date = this.starttime + '-'+ this.endtime
				dataDetail({date:date}).then( res =>{
					console.log(res)
					let result = res.data
					if(res.status == 200){
						that.jiamengdianyeji = result.store
						that.dailiyeji = result.agent
						that.chensghiyeji = result.cityPartner
						that.shequyeji = result.community
					}
				})
			},
		}
	}
</script>

<style scoped>
	
	.center-second{
		margin-top: 20rpx;
		background-color: #ffffff;
		border-radius: 20rpx;
		padding-bottom: 40rpx;
	}

</style>